import request from '@/utils/request'

export default {
    // 获取Banner分页列表
    queryBannerPage(page, limit) {
        return request({
            url: `/bannerAdmin/banner/queryBannerPage/${page}/${limit}`,
            method: 'get'
        })
    },

    // 根据id查询Banner
    queryBannerById(id) {
        return request({
            url: `/bannerAdmin/banner/queryBannerById/${id}`,
            method: 'get'
        })
    },

    // 新增Banner
    insertBanner(banner) {
        return request({
            url: `/bannerAdmin/banner/insertBanner`,
            method: 'post',
            data: banner
        })
    },

    // 根据id更新Banner
    updateBannerById(banner) {
        return request({
            url: `/bannerAdmin/banner/updateBannerById`,
            method: 'put',
            data: banner
        })
    },

    // 根据id删除Banner
    deleteBannerById(id) {
        return request({
            url: `/bannerAdmin/banner/deleteBannerById/${id}`,
            method: 'delete'
        })
    }
}